package chapter3.No3_2_方法join的使用.demo5;

/**
 * Created by Administrator on 2016/11/20.
 */
public class ThreadB extends Thread {
    @Override
    public void run() {
        try {
            System.out.println("b run begin :" + System.currentTimeMillis());
            Thread.sleep(4000);
            System.out.println("b run end :" + System.currentTimeMillis());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public synchronized void methodA() {
        System.out.println("B线程的A方法："+System.currentTimeMillis());
    }
}
